
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Defining the Informix database interface</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="connpbp50.htm">Previous</A>&nbsp;&nbsp;<A HREF="connpbp52.htm" >Next</A>
<!-- End Header -->
<A NAME="CHEEGGDF"></A><h1>Defining the Informix database interface</h1>
<A NAME="TI1006"></A><p>To define a connection through an Informix database interface,
you must create a database profile by supplying values for at least
the basic connection parameters in the Database Profile Setup dialog
box for Informix IN9 or I10. You can then select this profile at
any time to connect to your database in the development environment.</p>
<A NAME="TI1007"></A><p>For information on how to define a database profile, see <A HREF="connpbp7.htm#CEGJAEAF">"Using database profiles"</A>. </p>
<A NAME="TI1008"></A><h2>Specifying the server name </h2>
<A NAME="TI1009"></A><p>When you specify the server name value, you <i>must</i> use
the following format to connect to the database through the Informix
interfaces:</p>
<A NAME="TI1010"></A><p><p><PRE><i>host_name</i>@<i>server_name</i></PRE></p>
</p>
<A NAME="TI1011"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><tr><th  rowspan="1"  ><A NAME="TI1012"></A>Parameter</th>
<th  rowspan="1"  ><A NAME="TI1013"></A>Description</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1014"></A><i>host_name</i></td>
<td  rowspan="1"  ><A NAME="TI1015"></A>The name of the host computer running
the Informix database server. This corresponds to the Informix HOSTNAME environment
variable.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1016"></A><i>server_name</i></td>
<td  rowspan="1"  ><A NAME="TI1017"></A>The name of the server containing the
Informix database. This corresponds to the Informix SERVER environment variable.</td>
</tr>
</table>
<A NAME="TI1018"></A><p>For example, to use a PowerBuilder native interface to connect
to an Informix database server named <b>server01</b> running
on a host machine named <FONT FACE="Courier New">sales</FONT>,
do either of the following:<A NAME="TI1019"></A>
<ul>
<li class=fi><b>In
a database profile</b>   Type the host name (<FONT FACE="Courier New">sales</FONT>)
in the Host Name box and the server name (<FONT FACE="Courier New">server01</FONT>)
in the Server box on the Connection tab in the Database Profile
Setup dialog box. PowerBuilder saves this server name as <FONT FACE="Courier New">sales@server01</FONT> in
the database profile entry in the system registry.</li>
<li class=ds><b>In a PowerBuilder script</b>   Type the following in your PowerBuilder application script:<br>
<p><PRE> SQLCA.ServerName = "sales@server01"</PRE><br><br><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Tip</span> <A NAME="TI1020"></A>If you specify a value for Host Name and Server in your database
profile, this syntax displays on the Preview tab in the Database
Profile Setup dialog box. You can then copy the syntax from the
Preview tab into your script.
<br>

</li>
</ul>
</p>

